# 定义一个线程
import threading


def my_func(thread_number):
    return print('my_func called by thread N%2.f' % thread_number)


def main():
    threads = []
    for i in range(10):
        t = threading.Thread(target=my_func, args=(i,))  # 定义10个线程，每个线程执行同一个函数不同的参数
        # threads.append(t)
        t.start()
        t.join()


if __name__ == '__main__':
    main()
